package com.cj.file.entity;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

/**
 * @Author cheng jun
 * @Description:
 * @Date 2021/7/15 16:36
 */
@EnableConfigurationProperties({FileProperties.class, ServiceProperties.class})
@Component
public class Utils {

    @Resource
    private FileProperties fileProperties;

    private FileProperties fileProperties2;

    @PostConstruct
    public void init() {
        fileProperties2 = fileProperties;
    }

    public boolean getFileProperties() {
        //return fileProperties;
        System.out.println("aaaaaaaaaaaaaaaaaaaaa");
        System.out.println(fileProperties2);
        return false;
    }

}
